const express = require('express');
const app = express();
app.use((req,res,next)=>{
    console.log('中间件1');
    next();
});
app.use((req,res,next)=>{
    console.log('中间件2');
    next();
});
app.use((req,res,next)=>{
    console.log('中间件3');
    next();
});
app.use((req,res,next)=>{
    console.log('中间件4');
    next();
});
app.get('/',(req,res)=>{
    console.log('路由函数');
    res.end('home');
});
app.listen(3000,()=>console.log('server started on 3000'));